<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<p>List All Products We have now and Stock</p>
<hr />
<table width="1000" border="1" cellspacing="2" cellpadding="2">
  <tr>
    <td bgcolor="#CCCCCC">Img</td>
    <td bgcolor="#CCCCCC">ID</td>
    <td bgcolor="#CCCCCC">Barcode</td>
    <td bgcolor="#CCCCCC">Titile</td>
    <td bgcolor="#CCCCCC">W/H</td>
    <td bgcolor="#CCCCCC">ECO</td>
    <td bgcolor="#CCCCCC">Price</td>
  </tr>
  <?php
  $pStocks = new Model_DbTable_Productstock();
  foreach($this->productslist as $key => $value){
  ?>
  <tr>
    <td width="100">
    <img src="/im/thumbs/<?php echo $value['code_product']?>_0.jpg" width="100" />
    </td>
    <td><?php echo $value['id_product']?></td>
    <td><?php echo $value['code_product']?></td>
    <td width="250"><?php echo $value['title_product']?></td>
    <td width="28"><?php 
		$row = $pStocks->getStock($value['id_product']);
		echo $row['stock_wh']." [".$row['stock_wh_date']."]";	 	 
	?></td>
    <td width="30"><?php 
		$row = $pStocks->getStock($value['id_product']);
		echo $row['stock_ec'];		 
	?></td>
    <td>N/A</td>
  </tr>
  <?php
  }
  ?>
  <tr>
    <td bgcolor="#CCCCCC">Img</td>
    <td bgcolor="#CCCCCC">ID</td>
    <td bgcolor="#CCCCCC">Barcode</td>
    <td bgcolor="#CCCCCC">Titile</td>
    <td bgcolor="#CCCCCC">W/H</td>
    <td bgcolor="#CCCCCC">ECO</td>
    <td bgcolor="#CCCCCC">Price</td>
  </tr>
</table>

</body>
</html>
